You are here: Symbol Reference > Dew Namespace > Dew.Stats Namespace > Dew.Stats.Units Namespace > Classes > StatTimeSerAnalysis Class > StatTimeSerAnalysis Methods > DoubleExpForecast Method > StatTimeSerAnalysis.DoubleExpForecast Method ([In] TVec, [In] TVec, double, double, [In] int, out double, [In] int)
Dew Stats for .NET
ContentsIndexHome
PreviousUpNext
StatTimeSerAnalysis.DoubleExpForecast Method ([In] TVec, [In] TVec, double, double, [In] int, out double, [In] int)

First estimate Alpha and Gamma parameters by double smoothing and then use returned values to forecast up to T periods.

Syntax
C#
Visual Basic
public static void DoubleExpForecast([In] TVec Y, [In] TVec YHat, ref double Alpha, ref double Gamma, [In] int T, out double MSE, [In] int InitMethod);
Parameters 
Description 
[In] TVec Y 
Time series data set. 
[In] TVec YHat 
Time series forecasts. Size of the YHat vector are adjusted automatically. 
ref double Alpha 
Overal smoothing parameter used for forecast. 
ref double Gamma 
Trend smoothing parameter used for forecast. 
[In] int T 
Forecast values up to T period. 
out double MSE 
MSE, evaluated at minimum. 
[In] int InitMethod 
Defines how the initial values for b[0] are calculated. 

Use this routine if you don't know the best estimates for Alpha and Gamma.

Do estimation and forecasting in single routine call.

using Dew.Math; using Dew.Stats; using Dew.Stats.Units; namespace Dew.Examples { private void Example() { Vector Data = new Vector(0); Vector YHat = new Vector(0); int NumPoints = 20; Data.LoadFromFile("aerosol_particles.vec"); // last point period = Data.Length-1 + NumPoints int T = Data.Length-1+NumPoints; // initial estimates for alpha, gamma double alpha = 0.1; double gamma = 0.1; double MSE; StatTimeSerAnalysis.DoubleExpForecast(Data,YHat,ref alpha,ref gamma,T,out MSE,1); // returs MSE and estimated Alpha (from MLE) } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!